import 'package:flutter/material.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class MyRefreshFooter extends ClassicFooter {
  const MyRefreshFooter({
    Key key,
    Function onClick,
    LoadStyle loadStyle: LoadStyle.ShowAlways,
    double height: 60.0,
    outerBuilder,
    textStyle: const TextStyle(color: const Color(0xff555555)),
    loadingText: '正在加载...',
    failedText: '加载失败，请重试',
    noDataText: '已经全部加载完成',
    idleText: '加载更多',
    noMoreIcon,
    failedIcon: const Icon(Icons.error, color: Colors.grey),
    iconPos: IconPosition.left,
    spacing: 15.0,
    loadingIcon,
    idleIcon = const Icon(Icons.arrow_downward, color: Colors.grey),
  }) : super(
          key: key,
          onClick: onClick,
          loadStyle: loadStyle,
          height: height,
          outerBuilder: outerBuilder,
          textStyle: textStyle,
          loadingText: loadingText,
          noDataText: noDataText,
          noMoreIcon: noMoreIcon,
          idleText: idleText,
          failedText: failedText,
          failedIcon: failedIcon,
          iconPos: iconPos,
          spacing: spacing,
          loadingIcon: loadingIcon,
          idleIcon: idleIcon,
        );
}
